package com.aspose.cells;

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;

class zans {
   private zbwo a;
   private byte[] b;
   private zpb c;
   private int d;
   private byte[] e;
   private int f;
   private WorksheetCollection g;
   private Worksheet h;
   private ShapeCollection i;
   private Object j;
   private boolean k;
   private Range l;
   private ArrayList m = null;

   zans(zbwo var1, zpb var2, WorksheetCollection var3, Worksheet var4, Object var5) {
      this.a = var1;
      this.c = var2;
      this.b = new byte[2];
      this.h = var4;
      this.g = var3;
      this.j = var5;
   }

   boolean a() {
      return this.j instanceof Chart;
   }

   void b() throws Exception {
      if (this.m == null) {
         this.m = new ArrayList();
      }

      this.c.a(-2);
      this.k = false;
      this.l = null;
      Name var2;
      if (!this.a()) {
         var2 = this.g.getNames().a("_FilterDatabase", this.h.getIndex());
         if (var2 != null) {
            this.l = var2.getRange();
            if (this.l != null) {
               this.k = true;
            }
         }
      }

      var2 = null;

      label103:
      while(true) {
         this.d = this.c.b(this.b);
         int var5;
         switch(this.d) {
         case 60:
         case 236:
            this.c();
            var5 = 0;
            int var6;
            byte[] var11;
            if (this.e[2] == 2 && (this.e[3] & 255) == 240) {
               var6 = com.aspose.cells.b.a.zc.b(this.e, var5 + 8) >> 4;
               this.i = new ShapeCollection(this.g, this.h, this.g.Q(), this.j, var6);
               if (var6 > (this.g.Q().d().d() & '\uffff')) {
                  this.g.Q().d().a(var6);
               }

               this.a(this.i);
               var5 += 16;
               this.i.c().c().a(com.aspose.cells.b.a.zc.a(this.e, var5));
               this.i.c().c().b(com.aspose.cells.b.a.zc.a(this.e, var5 + 4));
               var5 += 8;
               Object var7 = null;
               boolean var8 = false;

               int var12;
               do {
                  var12 = com.aspose.cells.b.a.zc.e(this.e, var5 + 2);
                  switch(var12) {
                  case 61443:
                     var5 += 8;
                     var5 += 8 + com.aspose.cells.b.a.zc.a(this.e, var5 + 4);
                     break;
                  case 61720:
                     var5 += 8 + com.aspose.cells.b.a.zc.a(this.e, var5 + 4);
                     break;
                  case 61728:
                     var11 = new byte[8 + com.aspose.cells.b.a.zc.a(this.e, var5 + 4)];
                     System.arraycopy(this.e, var5, var11, 0, var11.length);
                     this.i.c().d().b = var11;
                     var5 += var11.length;
                  }
               } while(var12 != 61443 && var5 < (this.f & '\uffff'));
            }

            if (var5 < (this.f & '\uffff')) {
               if (this.i == null) {
                  this.i = this.h.getShapes();
               }

               if (this.e[var5 + 2] == 5 && this.e[var5 + 3] == -16) {
                  var6 = com.aspose.cells.b.a.zc.a(this.e, var5 + 4) + 8;
                  if (var6 != 0) {
                     var11 = new byte[var6];
                     this.a(0, var5, var11, 0, var6);
                     this.a(var11);
                  }

                  return;
               }

               byte[] var1 = new byte[(this.f & '\uffff') - var5];
               System.arraycopy(this.e, var5, var1, 0, (this.f & '\uffff') - var5);

               for(this.d = this.c.b(this.b); (this.d & '\uffff') == 60 || (this.d & '\uffff') == 236; this.d = this.c.b(this.b)) {
                  this.c();
                  byte[] var10 = new byte[var1.length + (this.f & '\uffff')];
                  System.arraycopy(var1, 0, var10, 0, var1.length);
                  System.arraycopy(this.e, 0, var10, var1.length, this.f & '\uffff');
                  var1 = var10;
               }

               if ((this.d & '\uffff') != 93) {
                  this.c.a(-2);
                  return;
               }

               this.c();
               Shape var9 = this.a(var1, 0, this.a(this.e[4]));
               if (var9 != null && ((this.a.a & 2) != 0 || (this.a.a & 4) != 0)) {
                  this.i.a((Shape)var9, (com.aspose.cells.b.a.d.zm)null);
                  this.b(var9);
               }
            }
            break;
         case 127:
            this.c();
            int var3 = com.aspose.cells.b.a.zc.a(this.e, 4);
            int var4 = var3 - ((this.f & '\uffff') - 4);

            while(true) {
               if (var4 <= 0) {
                  continue label103;
               }

               this.d = this.c.b(this.b);
               var5 = this.c.b(this.b) & '\uffff';
               this.c.a(var5);
               var4 -= var5;
            }
         default:
            this.c.a(-2);
            return;
         }
      }
   }

   private void a(byte[] var1) {
      HashMap var2 = new HashMap();

      int var3;
      for(var3 = 0; var3 < this.i.getCount(); ++var3) {
         var2.put(this.i.get(var3).N().i().b(), var3);
      }

      int var6;
      for(var3 = 8; var3 < var1.length; var3 += var6) {
         long var4 = com.aspose.cells.b.a.zc.d(var1, var3);
         var6 = com.aspose.cells.b.a.zc.a(var1, var3 + 4);
         var3 += 8;
         if ((var4 & 4294967295L) == 4027711489L) {
            int var7 = com.aspose.cells.b.a.zc.a(var1, var3 + 4);
            int var8 = com.aspose.cells.b.a.zc.a(var1, var3 + 8);
            int var9 = com.aspose.cells.b.a.zc.a(var1, var3 + 12);
            int var10 = com.aspose.cells.b.a.zc.a(var1, var3 + 16);
            int var11 = com.aspose.cells.b.a.zc.a(var1, var3 + 20);
            if (var10 != -1 && var11 != -1 && var2.get(var7) != null && var2.get(var8) != null && var2.get(var9) != null) {
               var7 = (Integer)var2.get(var7);
               var8 = (Integer)var2.get(var8);
               var9 = (Integer)var2.get(var9);
               this.i.get(var9).f = new zmk(var7, var10, var8, var11);
            }
         }
      }

   }

   private Shape a(byte[] var1, int var2, int var3) throws Exception {
      Object var4 = null;
      byte var6;
      int[] var7;
      int var15;
      switch(var3) {
      case 0:
         GroupShape var33 = new GroupShape(this.i);
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var33, var1, 0, this.e);
         var15 = var7[0];
         break;
      case 1:
         LineShape var32 = new LineShape(this.i);
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var32, var1, 0, this.e);
         var15 = var7[0];
         break;
      case 2:
         RectangleShape var31 = new RectangleShape(this.i);
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var31, var1, 0, this.e);
         var15 = var7[0];
         if (var15 != 0) {
            this.a((Shape)var4, var31.aa(), true);
         }
         break;
      case 3:
         Oval var30 = new Oval(this.i);
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var30, var1, 0, this.e);
         var15 = var7[0];
         if (var15 != 0) {
            this.c((Shape)var4);
         }
         break;
      case 4:
         ArcShape var29 = new ArcShape(this.i);
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var29, var1, 0, this.e);
         var15 = var7[0];
         if (var15 != 0) {
            this.a((Shape)var4, var29.aa(), true);
         }
         break;
      case 5:
         if ((this.a.a & 2) == 0) {
            this.a.d(this.c);
            return null;
         }

         Chart var27 = new Chart(this.g.get(this.h.m()), this.i);
         if (!this.a()) {
            this.h.getCharts().a(var27);
         }

         ChartShape var28 = var27.getChartObject();
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var28, var1, 0, this.e);
         var15 = var7[0];
         zjn var24 = new zjn(this.a, this.c, this.g, this.h);
         var24.a(var27);
         break;
      case 6:
         TextBox var26 = new TextBox(this.i);
         if (!this.a()) {
            this.h.getTextBoxes().a(var26);
         }

         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var26, var1, 0, this.e);
         var15 = var7[0];
         if (var15 > 0) {
            this.a((Shape)var4, var26.aa(), true);
         }
         break;
      case 7:
         Button var25 = new Button(this.i);
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var25, var1, 0, this.e);
         var15 = var7[0];
         this.a((Shape)var4, var25.aa(), true);
         break;
      case 8:
         Picture var23 = new Picture(this.i);
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var23, var1, 0, this.e);
         var15 = var7[0];
         this.a(var23);
         if (this.a((Shape)var4)) {
            OleObject var22 = new OleObject(this.i);
            CopyOptions var9 = new CopyOptions(true);
            var9.h = true;
            var22.a((Shape)var4, (CopyOptions)var9);
            var22.f(((Shape)var4).K());
            if (this.a(var22)) {
               var4 = var22;
               if (!this.a()) {
                  this.h.getOleObjects().a(var22);
               }

               var22.a(true);
            } else if (!this.a()) {
               this.h.getPictures().a(var23);
            }
         } else if (!this.a()) {
            this.h.getPictures().a(var23);
         }
         break;
      case 9:
         zavf var21 = new zavf(this.i);
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var21, var1, 0, this.e);
         var15 = var7[0];
         break;
      case 10:
      case 13:
      case 15:
      case 21:
      case 22:
      case 23:
      case 24:
      case 26:
      case 27:
      case 28:
      case 29:
      default:
         var4 = new Shape(this.i, var3, this.i);
         break;
      case 11:
         CheckBox var20 = new CheckBox(this.i);
         if (!this.a()) {
            this.h.getCheckBoxes().a(var20);
         }

         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var20, var1, 0, this.e);
         var15 = var7[0];
         this.a((Shape)var4, var20.aa(), true);
         this.a(var20);
         break;
      case 12:
         RadioButton var19 = new RadioButton(this.i);
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var19, var1, 0, this.e);
         var15 = var7[0];
         this.a((Shape)var4, var19.aa(), true);
         this.a(var19);
         break;
      case 14:
         Label var18 = new Label(this.i);
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var18, var1, 0, this.e);
         var15 = var7[0];
         this.a((Shape)var4, var18.aa(), true);
         break;
      case 16:
         Spinner var17 = new Spinner(this.i);
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var17, var1, 0, this.e);
         var15 = var7[0];
         this.a(var17);
         break;
      case 17:
         ScrollBar var16 = new ScrollBar(this.i);
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var16, var1, 0, this.e);
         var15 = var7[0];
         this.a(var16);
         break;
      case 18:
         ListBox var14 = new ListBox(this.i);
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var14, var1, 0, this.e);
         var15 = var7[0];
         this.a(var14);
         break;
      case 19:
         GroupBox var13 = new GroupBox(this.i);
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var13, var1, 0, this.e);
         var15 = var7[0];
         this.a((Shape)var4, var13.aa(), true);
         break;
      case 20:
         ComboBox var12 = new ComboBox(this.i);
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var12, var1, 0, this.e);
         var15 = var7[0];
         if (this.l != null && this.k && this.m.size() == 0) {
            zjx var8 = ((Shape)var4).N().h();
            if (var8.f() == this.l.a().StartRow && var8.l() == this.l.a().StartRow + 1 && var8.o() - var8.i() >= 1 && var8.o() <= this.l.a().EndColumn + 1 && var8.i() >= this.l.a().StartColumn) {
               return null;
            }
         }

         this.a(var12);
         break;
      case 25:
         Comment var11 = new Comment(this.h.getComments());
         CommentShape var10 = var11.getCommentShape();
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var10, var1, 0, this.e);
         var15 = var7[0];
         this.a((Shape)var4, var11.b(), true);
         break;
      case 30:
         CellsDrawing var5 = new CellsDrawing(this.i);
         var6 = 0;
         var7 = new int[]{var6};
         var4 = this.a(var7, var5, var1, 0, this.e);
         var15 = var7[0];
         if (var15 != 0) {
            this.c((Shape)var4);
         }
      }

      return (Shape)var4;
   }

   private void b(Shape var1) {
      if (this.m.size() != 0) {
         int var2 = this.m.size();
         if (var1.getMsoDrawingType() == 0) {
            --var2;
            if (var2 > 0) {
               ((GroupShape)this.m.get(var2 - 1)).a(var1);
            }
         } else {
            ((GroupShape)this.m.get(var2 - 1)).a(var1);
         }

         for(int var3 = var2 - 1; var3 >= 0 && ((GroupShape)this.m.get(var3)).b() == 0; --var3) {
            GroupShape var4 = (GroupShape)this.m.get(var3);
            ArrayList var5 = var4.d();
            boolean var6 = false;
            double var7 = 1.0D;
            double var9 = 1.0D;
            int var11;
            int var16;
            int var17;
            if (!var4.S() && var4.getWidth() != 0 && var4.getHeight() != 0) {
               var11 = var4.a().b + var4.a().a;
               int var12 = var4.a().d + var4.a().c;

               for(int var13 = 0; var13 < var5.size(); ++var13) {
                  Shape var14 = (Shape)var5.get(var13);
                  int[] var15 = var14.d(false);
                  var16 = var15[0] + var15[2];
                  if (var16 > var11) {
                     var11 = var16;
                  }

                  var17 = var15[1] + var15[3];
                  if (var17 > var12) {
                     var12 = var17;
                  }
               }

               var6 = var11 > var4.a().b + var4.a().a + 5 || var12 > var4.a().d + var4.a().c + 5;
               if (var6) {
                  double var19 = (double)(var11 - var4.a().a);
                  var7 = var19 / (double)var4.a().b;
                  double var22 = (double)(var12 - var4.a().c);
                  var9 = var22 / (double)var4.a().d;
                  var4.a().b = var11 - var4.a().a;
                  var4.a().d = var12 - var4.a().c;
               }
            }

            for(var11 = 0; var11 < var5.size(); ++var11) {
               Shape var18 = (Shape)var5.get(var11);
               int[] var20 = var18.d(false);
               int var21 = (int)((double)(var20[0] - var4.a().a) / (double)var4.a().b * 4000.0D + 0.5D);
               if (var21 < 0) {
                  var21 = 0;
               }

               int var23 = (int)((double)(var20[1] - var4.a().c) / (double)var4.a().d * 4000.0D + 0.5D);
               var16 = (int)((double)var20[2] / (double)var4.a().b * 4000.0D + 0.5D);
               var17 = (int)((double)var20[3] / (double)var4.a().d * 4000.0D + 0.5D);
               var18.a(0, false, var21, var23, var16, var17);
            }

            if (var6 && !var4.S()) {
               if (var4.N().h().c != null) {
                  var4.N().h().c.j = var7;
                  var4.N().h().c.k = var9;
               } else {
                  var4.setWidth((int)((double)var4.getWidth() * var7));
                  var4.setHeight((int)((double)var4.getHeight() * var9));
               }
            }

            this.m.remove(var3);
         }
      }

   }

   int a(byte var1) {
      switch(var1) {
      case 0:
         return 0;
      case 1:
         return 1;
      case 2:
         return 2;
      case 3:
         return 3;
      case 4:
         return 4;
      case 5:
         return 5;
      case 6:
      case 13:
         return 6;
      case 7:
         return 7;
      case 8:
         return 8;
      case 9:
         return 9;
      case 10:
      case 21:
      case 22:
      case 23:
      case 26:
      case 27:
      case 28:
      default:
         throw new IllegalArgumentException("Unsupported mso drawing type.");
      case 11:
         return 11;
      case 12:
         return 12;
      case 14:
         return 14;
      case 15:
         return 15;
      case 16:
         return 16;
      case 17:
         return 17;
      case 18:
         return 18;
      case 19:
         return 19;
      case 20:
         return 20;
      case 24:
         return 2;
      case 25:
         return 25;
      case 29:
         return 29;
      case 30:
         return 30;
      }
   }

   ArrayList a(byte[] var1, int var2) throws Exception {
      int var3 = var2;
      ArrayList var4 = new ArrayList();
      Object var5 = null;
      boolean var6 = false;

      while(var3 < var1.length) {
         byte[] var11;
         int var12;
         switch(var1[var3]) {
         case 19:
            var12 = com.aspose.cells.b.a.zc.e(var1, var3 + 2) & '\uffff';
            int var7 = var1.length - var3;
            if (var12 != 0 && var12 + 4 < var7 && var12 + var3 + 4 == var1.length - 1) {
               ArrayList var8 = new ArrayList();

               while(true) {
                  this.d = this.c.b(this.b);
                  if ((this.d & '\uffff') != 60) {
                     this.c.a(-2);
                     break;
                  }

                  this.c();
                  if ((this.f & '\uffff') > 4 && this.e[0] == 15 && this.e[1] == 0 && (this.e[2] == 4 || this.e[2] == 2) && (this.e[3] & 255) == 240) {
                     this.c.a(-((this.f & '\uffff') + 4));
                     break;
                  }

                  com.aspose.cells.b.a.a.ze.a(var8, (Object)this.e);
                  var7 += this.f & '\uffff';
               }

               var11 = new byte[var7];
               System.arraycopy(var1, var3, var11, 0, var1.length - var3);
               var7 = var1.length - var3;

               for(int var9 = 0; var9 < var8.size(); ++var9) {
                  byte[] var10 = (byte[])((byte[])var8.get(var9));
                  System.arraycopy(var10, 0, var11, var7, var10.length);
                  var7 += var10.length;
               }

               com.aspose.cells.b.a.a.ze.a(var4, (Object)var11);
            } else {
               var11 = new byte[var1.length - var3];
               System.arraycopy(var1, var3, var11, 0, var11.length);
               com.aspose.cells.b.a.a.ze.a(var4, (Object)var11);
            }

            return var4;
         default:
            if (var3 + 2 >= var1.length) {
               return var4;
            }

            var12 = com.aspose.cells.b.a.zc.e(var1, var3 + 2) & '\uffff';
            var11 = new byte[var12 + 4];
            System.arraycopy(var1, var3, var11, 0, var11.length);
            com.aspose.cells.b.a.a.ze.a(var4, (Object)var11);
            if (var1[var3] == 0) {
               return var4;
            }

            var3 += var11.length;
         }
      }

      return var4;
   }

   boolean a(Shape var1) {
      ArrayList var2 = var1.O().a;
      boolean var3 = false;
      if (var2 != null && var2.size() != 0) {
         for(int var4 = 0; var4 < var2.size(); ++var4) {
            byte[] var5 = (byte[])((byte[])var2.get(var4));
            if (var5[0] == 9) {
               int var6 = com.aspose.cells.b.a.zc.e(var5, 2) & '\uffff';
               int var7 = (com.aspose.cells.b.a.zc.e(var5, 4) & '\uffff') + 2;
               if (var6 - var7 == 4) {
                  return true;
               }

               return var3;
            }

            if (var5[0] == 8 && var5.length > 4) {
               var3 = (var5[4] & 255 & 2) != 0;
            }
         }

         return false;
      } else {
         return false;
      }
   }

   boolean a(OleObject var1) {
      ArrayList var2 = var1.O().a;
      if (var2 != null && var2.size() != 0) {
         ArrayList var3 = new ArrayList();
         Object var4 = null;
         boolean var5 = false;

         for(int var6 = 0; var6 < var2.size(); ++var6) {
            byte[] var11 = (byte[])((byte[])var2.get(var6));
            switch(var11[0]) {
            case 0:
            case 7:
               break;
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:
            default:
               com.aspose.cells.b.a.a.ze.a(var3, (Object)var11);
               break;
            case 8:
               var1.a(var11[4]);
               switch(var1.b()) {
               case 0:
               case 1:
               case 3:
               case 5:
               case 8:
               case 9:
                  continue;
               case 2:
               case 4:
               case 6:
               case 7:
               default:
                  return true;
               }
            case 9:
               byte var12 = 2;
               int var7 = com.aspose.cells.b.a.zc.e(var11, var12) & '\uffff';
               int var8;
               int var9;
               int var13;
               switch(var1.b()) {
               case 0:
               case 1:
               case 5:
               case 8:
               case 9:
                  var8 = com.aspose.cells.b.a.zc.e(var11, var12 + 2) & '\uffff';
                  var12 = 18;
                  var9 = com.aspose.cells.b.a.zc.e(var11, var12) & '\uffff';
                  if (var11[var12 + 2] == 0) {
                     var1.setProgID(zco.a(var11, var12 + 3, var9));
                  } else {
                     var1.setProgID(Encoding.getUnicode().a(var11, var12 + 3, var9 * 2));
                  }

                  var13 = var8 + 6;
                  var1.e(com.aspose.cells.b.a.zc.a(var11, var13));
               case 2:
               case 4:
               case 6:
               case 7:
               default:
                  break;
               case 3:
                  var8 = com.aspose.cells.b.a.zc.e(var11, var12 + 2) & '\uffff';
                  int var10;
                  if (var8 + 2 == var7) {
                     short var14 = com.aspose.cells.b.a.zc.b(var11, 13);
                     var10 = com.aspose.cells.b.a.zc.a(var11, 15) - 1;
                     var1.c(var14);
                     var1.d(var10);
                     return true;
                  }

                  if (var8 + 6 != var7) {
                     return true;
                  }

                  var9 = com.aspose.cells.b.a.zc.e(var11, var12 + 2) & '\uffff';
                  var12 = 18;
                  var10 = com.aspose.cells.b.a.zc.e(var11, var12) & '\uffff';
                  if (var11[var12 + 2] == 0) {
                     var1.setProgID(zco.a(var11, var12 + 3, var10));
                  } else {
                     var1.setProgID(Encoding.getUnicode().a(var11, var12 + 3, var10 * 2));
                  }

                  var13 = var9 + 6;
                  var1.e(com.aspose.cells.b.a.zc.a(var11, var13));
               }
            }
         }

         if (var3.size() > 0) {
            var1.O().a = var3;
         } else {
            var1.O().a = null;
         }

         return true;
      } else {
         return true;
      }
   }

   void a(Picture var1) throws Exception {
      ArrayList var2 = var1.O().a;
      if (var2 != null && var2.size() != 0) {
         Object var3 = null;

         for(int var4 = 0; var4 < var2.size(); ++var4) {
            byte[] var17 = (byte[])((byte[])var2.get(var4));
            switch(var17[0]) {
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
            default:
               break;
            case 8:
               if (var17[2] == 2) {
                  var1.a(com.aspose.cells.b.a.zc.b(var17, 4));
               }
               break;
            case 9:
               int var5 = com.aspose.cells.b.a.zc.e(var17, 4) & '\uffff';
               if (var5 != 0) {
                  int var6 = com.aspose.cells.b.a.zc.e(var17, 6) & '\uffff';
                  if (var17[12] != 2) {
                     var1.f(this.g.b().a(12, var6, var17, 0, 0, false));
                     if (var1.ac() != null && var1.ac().startsWith("=")) {
                        var1.f(var1.ac().substring(1));
                     }
                  } else {
                     try {
                        com.aspose.cells.b.a.d.zh var7 = this.a.b.a().a("Ctls");
                        if (var1.e() && !var1.f() && var7 != null) {
                           int var8 = 6 + var5;
                           int var9 = com.aspose.cells.b.a.zc.a(var17, var8);
                           int var10 = com.aspose.cells.b.a.zc.a(var17, var8 + 4);
                           var8 += 8;
                           var7.a((long)var9, 0);
                           byte[] var11 = new byte[var10];
                           var7.a(var11, 0, var10);
                           zpf var12 = new zpf(var1, false);
                           var12.i = new UnknownControl(var1, var11, 3);
                           var12.a = var1.getName();
                           var12.b = zase.y(var1.N().i().b());
                           var1.x = var12;
                           int var13 = com.aspose.cells.b.a.zc.a(var17, var8);
                           var8 += 4 + var13;
                           short var14 = com.aspose.cells.b.a.zc.b(var17, var8);
                           var8 += 2;
                           short var15;
                           if (var14 != 0) {
                              var15 = com.aspose.cells.b.a.zc.b(var17, var8);
                              var1.c(new byte[var15]);
                              System.arraycopy(var17, var8 + 6, var1.X(), 0, var15);
                              var8 += var14;
                           }

                           var14 = com.aspose.cells.b.a.zc.b(var17, var8);
                           var8 += 2;
                           if (var14 != 0) {
                              var15 = com.aspose.cells.b.a.zc.b(var17, var8);
                              var1.v = new byte[var15];
                              System.arraycopy(var17, var8 + 6, var1.v, 0, var15);
                              int var10000 = var8 + var14;
                           }
                        }
                     } catch (Exception var16) {
                        ;
                     }
                  }
               }
            }
         }

      }
   }

   void a(CheckBox var1) {
      ArrayList var2 = var1.O().a;
      if (var2 != null && var2.size() != 0) {
         ArrayList var3 = new ArrayList();
         Object var4 = null;
         boolean var5 = false;

         for(int var6 = var2.size() - 1; var6 >= 0; --var6) {
            byte[] var9 = (byte[])((byte[])var2.get(var6));
            byte var10;
            switch(var9[0]) {
            case 0:
               break;
            case 10:
            case 18:
               var10 = 4;
               switch(var9[var10]) {
               case 0:
                  var1.a(0);
                  break;
               case 1:
                  var1.a(1);
                  break;
               case 2:
                  var1.a(2);
               }

               if (var9[0] == 18) {
                  var1.setShadow((var9[10] & 255 & 1) == 0);
               }
               break;
            case 20:
               var10 = 4;
               int var7 = var9[var10] & 255;
               int var11 = var10 + 6;
               byte[] var8 = new byte[var7];
               System.arraycopy(var9, var11, var8, 0, var7);
               var1.c(var8);
               break;
            default:
               com.aspose.cells.b.a.a.ze.a(var3, (Object)var9);
            }
         }

         if (var3.size() > 0) {
            var1.O().a = var3;
         } else {
            var1.O().a = null;
         }

      }
   }

   void a(RadioButton var1) {
      ArrayList var2 = var1.O().a;
      if (var2 != null && var2.size() != 0) {
         ArrayList var3 = new ArrayList();
         Object var4 = null;
         boolean var5 = false;

         for(int var6 = var2.size() - 1; var6 >= 0; --var6) {
            byte[] var9 = (byte[])((byte[])var2.get(var6));
            byte var10;
            switch(var9[0]) {
            case 0:
            case 11:
            case 17:
               break;
            case 10:
            case 18:
               var10 = 4;
               var1.a(var9[var10] == 1);
               if (var9[0] == 18) {
                  var1.setShadow((var9[10] & 255 & 1) == 0);
               }
               break;
            case 20:
               var10 = 4;
               int var7 = var9[var10] & 255;
               int var11 = var10 + 6;
               byte[] var8 = new byte[var7];
               System.arraycopy(var9, var11, var8, 0, var7);
               var1.c(var8);
               break;
            default:
               com.aspose.cells.b.a.a.ze.a(var3, (Object)var9);
            }
         }

         if (var3.size() > 0) {
            var1.O().a = var3;
         } else {
            var1.O().a = null;
         }

      }
   }

   void a(ComboBox var1) {
      if (!var1.N().h().b()) {
         ArrayList var2 = var1.O().a;
         if (var2 != null && var2.size() != 0) {
            ArrayList var3 = new ArrayList();
            Object var4 = null;
            boolean var5 = false;
            boolean var6 = false;

            for(int var7 = var2.size() - 1; var7 >= 0; --var7) {
               byte[] var14 = (byte[])((byte[])var2.get(var7));
               byte var15;
               int var16;
               int var17;
               switch(var14[0]) {
               case 0:
               case 12:
                  break;
               case 14:
                  var15 = 4;
                  var17 = com.aspose.cells.b.a.zc.e(var14, var15) & '\uffff';
                  var16 = var15 + 6;
                  byte[] var20 = new byte[var17];
                  System.arraycopy(var14, var16, var20, 0, var17);
                  var1.c(var20);
                  break;
               case 19:
                  var15 = 4;
                  int var8 = com.aspose.cells.b.a.zc.e(var14, var15) & '\uffff';
                  var17 = var14[var15 + 2] & 255;
                  var16 = var15 + 2;
                  if (var8 != 0) {
                     byte[] var9 = new byte[var17];
                     System.arraycopy(var14, var16 + 6, var9, 0, var17);
                     var1.e(var9);
                     var16 += var8;
                  }

                  var16 += 2;
                  int var18 = (com.aspose.cells.b.a.zc.e(var14, var16) & '\uffff') - 1;
                  if (var18 >= 0) {
                     var1.a(var18);
                  }

                  var1.setShadow((var14[var16 + 2] & 255 & 8) == 0);
                  boolean var10 = (var14[var16 + 2] & 255 & 2) != 0;
                  var16 += 6;
                  if (var1.getMsoDrawingType() == 20) {
                     var1.setDropDownLines(com.aspose.cells.b.a.zc.e(var14, var16 + 2));
                     var16 += 6;
                     int var11 = var16;
                     int[] var12 = new int[]{var16};
                     zco.a(var14, var12);
                     var16 = var12[0];
                     if ((var16 - var11) % 2 == 1) {
                        ++var16;
                     }
                  }

                  if (!var10 || var8 != 0 || var17 == 0 || var16 >= var14.length) {
                     break;
                  }

                  ArrayList var19 = new ArrayList();
                  int var21 = 0;

                  for(; var21 < var17 && var16 < var14.length; ++var21) {
                     var8 = com.aspose.cells.b.a.zc.e(var14, var16) & '\uffff';
                     if (var14[var16 + 2] == 0) {
                        com.aspose.cells.b.a.a.ze.a(var19, (Object)Encoding.getASCII().a(var14, var16 + 3, var8));
                        var16 += 3 + var8;
                     } else {
                        com.aspose.cells.b.a.a.ze.a(var19, (Object)Encoding.getUnicode().a(var14, var16 + 3, var8 * 2));
                        var16 += 3 + var8 * 2;
                     }
                  }

                  var1.a = new String[var19.size()];

                  for(var21 = 0; var21 < var19.size(); ++var21) {
                     var1.a[var21] = (String)var19.get(var21);
                  }
                  break;
               default:
                  com.aspose.cells.b.a.a.ze.a(var3, (Object)var14);
               }
            }

            if (var3.size() > 0) {
               var1.O().a = var3;
            } else {
               var1.O().a = null;
            }

         }
      }
   }

   private void a(Shape var1, byte[] var2) {
      byte var3 = 4;
      int var4 = com.aspose.cells.b.a.zc.e(var2, var3) & '\uffff';
      int var6 = var3 + 6;
      byte[] var5 = new byte[var4];
      System.arraycopy(var2, var6, var5, 0, var4);
      var1.c(var5);
   }

   void a(Spinner var1) {
      ArrayList var2 = var1.O().a;
      if (var2 != null && var2.size() != 0) {
         ArrayList var3 = new ArrayList();
         Object var4 = null;
         boolean var5 = false;

         for(int var6 = var2.size() - 1; var6 >= 0; --var6) {
            byte[] var7 = (byte[])((byte[])var2.get(var6));
            switch(var7[0]) {
            case 0:
               break;
            case 4:
               var1.O().b = var7;
               break;
            case 12:
               byte var8 = 8;
               var1.a = com.aspose.cells.b.a.zc.e(var7, var8);
               var1.b = com.aspose.cells.b.a.zc.e(var7, var8 + 2);
               var1.c = com.aspose.cells.b.a.zc.e(var7, var8 + 4);
               var1.d = com.aspose.cells.b.a.zc.e(var7, var8 + 6);
               var1.e = com.aspose.cells.b.a.zc.e(var7, var8 + 8);
               var1.setHorizontal(var7[var8 + 10] == 1);
               var1.setShadow((var7[var8 + 14] & 255 & 128) == 0);
               break;
            case 14:
               this.a(var1, var7);
               break;
            default:
               com.aspose.cells.b.a.a.ze.a(var3, (Object)var7);
            }
         }

         var1.O().a = null;
      }
   }

   void a(ScrollBar var1) {
      ArrayList var2 = var1.O().a;
      if (var2 != null && var2.size() != 0) {
         ArrayList var3 = new ArrayList();
         Object var4 = null;
         boolean var5 = false;

         for(int var6 = var2.size() - 1; var6 >= 0; --var6) {
            byte[] var7 = (byte[])((byte[])var2.get(var6));
            switch(var7[0]) {
            case 0:
               break;
            case 4:
               var1.O().b = var7;
               break;
            case 12:
               byte var8 = 8;
               var1.a = com.aspose.cells.b.a.zc.e(var7, var8);
               var1.b = com.aspose.cells.b.a.zc.e(var7, var8 + 2);
               var1.c = com.aspose.cells.b.a.zc.e(var7, var8 + 4);
               var1.d = com.aspose.cells.b.a.zc.e(var7, var8 + 6);
               var1.e = com.aspose.cells.b.a.zc.e(var7, var8 + 8);
               var1.setHorizontal(var7[var8 + 10] == 1);
               var1.setShadow((var7[var8 + 14] & 255 & 128) == 0);
               break;
            case 14:
               this.a(var1, var7);
               break;
            default:
               com.aspose.cells.b.a.a.ze.a(var3, (Object)var7);
            }
         }

         var1.O().a = null;
      }
   }

   void a(ListBox var1) {
      if (!var1.N().h().b()) {
         ArrayList var2 = var1.O().a;
         if (var2 != null && var2.size() != 0) {
            ArrayList var3 = new ArrayList();
            Object var4 = null;
            boolean var5 = false;
            boolean var6 = false;

            label77:
            for(int var7 = var2.size() - 1; var7 >= 0; --var7) {
               byte[] var12 = (byte[])((byte[])var2.get(var7));
               byte var13;
               int var14;
               int var15;
               switch(var12[0]) {
               case 0:
                  break;
               case 12:
                  var13 = 8;
                  var1.b(com.aspose.cells.b.a.zc.e(var12, var13));
                  var1.c(com.aspose.cells.b.a.zc.e(var12, var13 + 2));
                  var1.d(com.aspose.cells.b.a.zc.e(var12, var13 + 4));
                  var1.e(com.aspose.cells.b.a.zc.e(var12, var13 + 6));
                  var1.setPageChange(com.aspose.cells.b.a.zc.e(var12, var13 + 8));
                  var1.setShadow((var12[var13 + 14] & 255 & 128) == 0);
                  break;
               case 14:
                  var13 = 4;
                  var15 = com.aspose.cells.b.a.zc.e(var12, var13) & '\uffff';
                  var14 = var13 + 6;
                  byte[] var17 = new byte[var15];
                  System.arraycopy(var12, var14, var17, 0, var15);
                  var1.c(var17);
                  break;
               case 19:
                  var13 = 4;
                  int var8 = com.aspose.cells.b.a.zc.e(var12, var13) & '\uffff';
                  var15 = var12[var13 + 2] & 255;
                  var14 = var13 + 2;
                  if (var8 != 0) {
                     byte[] var9 = new byte[var15];
                     System.arraycopy(var12, var14 + 6, var9, 0, var15);
                     var1.e(var9);
                     var14 += var8;
                  }

                  var14 += 2;
                  var1.setShadow((var12[var14 + 2] & 255 & 8) == 0);
                  switch(var12[var14 + 2] & 255 & 48) {
                  case 0:
                     var1.setSelectionType(0);
                     break;
                  case 16:
                     var1.setSelectionType(1);
                     break;
                  case 32:
                     var1.setSelectionType(2);
                  }

                  int var16 = (com.aspose.cells.b.a.zc.e(var12, var14) & '\uffff') - 1;
                  if (var16 >= 0 && var1.getSelectionType() == 0) {
                     var1.setSelectedIndex(var16);
                  }

                  var14 += 6;
                  int var10 = var1.getItemCount();
                  if (var1.getSelectionType() == 0) {
                     break;
                  }

                  var1.a(new ArrayList());
                  int var11 = 0;

                  while(true) {
                     if (var11 >= var10 || var14 + var11 >= var12.length) {
                        continue label77;
                     }

                     if (var12[var14 + var11] != 0) {
                        com.aspose.cells.b.a.a.ze.a(var1.a(), (Object)var11);
                     }

                     ++var11;
                  }
               default:
                  com.aspose.cells.b.a.a.ze.a(var3, (Object)var12);
               }
            }

            if (var3.size() > 0) {
               var1.O().a = var3;
            } else {
               var1.O().a = null;
            }

         }
      }
   }

   private void b(Shape var1, byte[] var2) throws Exception {
      var1.f(com.aspose.cells.b.a.zc.e(var2, 6));
      if (var1.K() > var1.J().e()) {
         var1.J().b(var1.K());
      }

      var1.O().a((var2[8] & 255 & 1) != 0);
      var1.O().b((var2[8] & 255 & 16) != 0);
      var1.O().e((var2[9] & 255 & 1) != 0);
      var1.O().c((var2[9] & 255 & 32) != 0);
      var1.O().d((var2[9] & 255 & 64) != 0);
      if (var2.length > 26) {
         var1.O().a = this.a(var2, 22);
      }

   }

   private Shape a(int[] var1, Shape var2, byte[] var3, int var4, byte[] var5) throws Exception {
      int var6 = var4;
      this.b((Shape)var2, var5);
      ((Shape)var2).N().c().a();
      ((Shape)var2).N().e();
      GroupShape var9 = null;
      int var10 = 0;
      int var11 = 0;
      boolean var12 = false;
      boolean var13 = false;
      boolean var14 = true;
      boolean var15 = false;

      while(true) {
         int var8 = com.aspose.cells.b.a.zc.e(var3, var6 + 2);
         int var17;
         int var20;
         int var22;
         int var24;
         int var26;
         int var27;
         int var33;
         int var34;
         byte[] var43;
         int var44;
         switch(var8) {
         case 61443:
            var15 = true;
            int var16 = com.aspose.cells.b.a.zc.a(var3, var6 + 4);
            if (this.m.size() != 0) {
               var9 = (GroupShape)this.m.get(this.m.size() - 1);
               var9.a(var9.b() - (8 + var16));
            }

            if (!(var2 instanceof GroupShape)) {
               var2 = new GroupShape(this.i);
               this.b((Shape)var2, var5);
            }

            var9 = (GroupShape)var2;
            var9.a(var16);
            com.aspose.cells.b.a.a.ze.a(this.m, (Object)var9);
            var6 += 8;
            break;
         case 61444:
            var11 = com.aspose.cells.b.a.zc.a(var3, var6 + 4) + 8;
            var10 = 0;
            if (this.m.size() != 0) {
               var9 = (GroupShape)this.m.get(this.m.size() - 1);
               var9.a(var9.b() - var11);
            }

            var6 += 8;
            break;
         case 61449:
            var15 = true;
            var6 += 8;
            var10 = 16;
            var9 = (GroupShape)this.m.get(this.m.size() - 1);
            var9.a().a = com.aspose.cells.b.a.zc.a(var3, var6);
            var9.a().c = com.aspose.cells.b.a.zc.a(var3, var6 + 4);
            var9.a().b = com.aspose.cells.b.a.zc.a(var3, var6 + 8) - var9.a().a;
            var9.a().d = com.aspose.cells.b.a.zc.a(var3, var6 + 12) - var9.a().c;
            var6 += 16;
            break;
         case 61450:
            var10 = 8;
            ((Shape)var2).N().i().a((short)((com.aspose.cells.b.a.zc.e(var3, var6) & '\uffff') >> 4));
            var6 += 8;
            ((Shape)var2).N().i().b(com.aspose.cells.b.a.zc.a(var3, var6));
            ((Shape)var2).N().i().c(com.aspose.cells.b.a.zc.a(var3, var6 + 4));
            var6 += 8;
            break;
         case 61451:
            var17 = com.aspose.cells.b.a.zc.b(var3, var6) >> 4;
            com.aspose.cells.b.a.zc.a(var3, var6 + 4);
            var6 += 8;
            int var18 = var6 + var17 * 6;

            for(var20 = 0; var20 < var17; ++var20) {
               var33 = com.aspose.cells.b.a.zc.e(var3, var6);
               var34 = com.aspose.cells.b.a.zc.a(var3, var6 + 2);
               if ((var33 & '\uffff') == 904) {
                  var6 += 6;
               } else {
                  if ((var33 & '\uffff' & '耀') != 0) {
                     if (var34 == 0) {
                        var6 += 6;
                        continue;
                     }

                     if (zash.b(var33, var34)) {
                        int var38 = com.aspose.cells.b.a.zc.e(var3, var18 + 4) & '\uffff';
                        if (var38 == 65520) {
                           var38 = 4;
                        }

                        var22 = (com.aspose.cells.b.a.zc.e(var3, var18) & '\uffff') * var38;
                        if (var22 == var34) {
                           var34 += 6;
                        } else if (var22 + 6 != var34) {
                           var34 += 6;
                        }

                        byte[] var45 = new byte[var34];
                        System.arraycopy(var3, var18, var45, 0, var34);
                        ((Shape)var2).N().c().a(var33, 5, var45);
                        var18 += var34;
                     } else {
                        byte[] var40 = new byte[var34];
                        System.arraycopy(var3, var18, var40, 0, var34);
                        ((Shape)var2).N().c().a(var33, 4, var40);
                        var18 += var34;
                     }
                  } else {
                     switch(var33) {
                     case 4:
                        double var42 = (double)zash.f(var34);
                        if (((Shape)var2).isFlippedHorizontally() ^ ((Shape)var2).isFlippedVertically()) {
                           var42 = -var42;
                           if (var42 < 0.0D) {
                              var42 += 360.0D;
                           }
                        }

                        ((Shape)var2).N().c().b(var33, (float)var42);
                        break;
                     default:
                        ((Shape)var2).N().c().a(var33, 0, var34);
                     }
                  }

                  var6 += 6;
               }
            }

            var10 = var18 - var6;
            var6 = var18;
            break;
         case 61455:
            var6 += 8;
            var10 = 16;
            if (var2 instanceof GroupShape) {
               var9 = (GroupShape)this.m.get(this.m.size() - 2);
            } else {
               var9 = (GroupShape)this.m.get(this.m.size() - 1);
            }

            var24 = com.aspose.cells.b.a.zc.a(var3, var6);
            var44 = com.aspose.cells.b.a.zc.a(var3, var6 + 4);
            var26 = com.aspose.cells.b.a.zc.a(var3, var6 + 8) - var24;
            var27 = com.aspose.cells.b.a.zc.a(var3, var6 + 12) - var44;
            if (var26 == 0 && var27 == 0) {
               var24 = var9.a().a;
               var44 = var9.a().c;
            }

            ((Shape)var2).a(((Shape)var2).getPlacement(), false, var24, var44, var26, var27);
            var6 += 16;
            break;
         case 61456:
            var10 = 18;
            var6 += 8;
            boolean var39 = true;
            byte var41;
            switch(var3[var6]) {
            case 1:
               var41 = 2;
               ((Shape)var2).N().h().a(true);
               break;
            case 2:
               if (this.a()) {
                  var41 = 1;
               } else {
                  var41 = 1;
               }
               break;
            case 3:
               var41 = 0;
               break;
            default:
               var41 = 2;
            }

            var6 += 2;
            if (this.a()) {
               var24 = com.aspose.cells.b.a.zc.a(var3, var6 + 0);
               var44 = com.aspose.cells.b.a.zc.a(var3, var6 + 4);
               var26 = com.aspose.cells.b.a.zc.a(var3, var6 + 8);
               var27 = com.aspose.cells.b.a.zc.a(var3, var6 + 12);
               ((Shape)var2).a(2, var24, var44, var26 - var24, var27 - var44);
               ((Shape)var2).N().h().a(2);
            } else {
               var24 = com.aspose.cells.b.a.zc.e(var3, var6) & '\uffff';
               var44 = com.aspose.cells.b.a.zc.e(var3, var6 + 2) & '\uffff';
               var26 = com.aspose.cells.b.a.zc.e(var3, var6 + 4) & '\uffff';
               var27 = com.aspose.cells.b.a.zc.e(var3, var6 + 6) & '\uffff';
               int var28 = com.aspose.cells.b.a.zc.e(var3, var6 + 8) & '\uffff';
               int var29 = com.aspose.cells.b.a.zc.e(var3, var6 + 10) & '\uffff';
               int var30 = com.aspose.cells.b.a.zc.e(var3, var6 + 12) & '\uffff';
               int var31 = com.aspose.cells.b.a.zc.e(var3, var6 + 14) & '\uffff';
               ((Shape)var2).a(var41, var26, var27, var24, var44, var30, var31, var28, var29);
            }

            var6 += 16;
            break;
         case 61457:
            var10 = 0;
            var6 += 8;
            break;
         case 61730:
            var20 = com.aspose.cells.b.a.zc.b(var3, var6) >> 4;
            Object var21 = var2;
            if (var11 == 0 && this.i.getCount() != 0) {
               var21 = this.i.get(this.i.getCount() - 1);
               var14 = false;
            }

            var10 = com.aspose.cells.b.a.zc.a(var3, var6 + 4);
            var6 += 8;
            var22 = var6 + var20 * 6;

            for(int var23 = 0; var23 < var20; ++var23) {
               var33 = com.aspose.cells.b.a.zc.e(var3, var6);
               var34 = com.aspose.cells.b.a.zc.a(var3, var6 + 2);
               if ((var33 & '\uffff') == 904) {
                  var6 += 6;
               } else {
                  if ((var33 & '\uffff' & '耀') != 0) {
                     if (var34 == 0) {
                        var6 += 6;
                        continue;
                     }

                     if (zash.b(var33, var34)) {
                        var24 = (com.aspose.cells.b.a.zc.e(var3, var22) & '\uffff') * (com.aspose.cells.b.a.zc.e(var3, var22 + 4) & '\uffff');
                        if (var24 + 6 != var34) {
                           var34 += 6;
                        }

                        byte[] var25 = new byte[var34];
                        System.arraycopy(var3, var22, var25, 0, var34);
                        ((Shape)var21).N().f().a(var33, 5, var25);
                        var22 += var34;
                     } else {
                        var43 = new byte[var34];
                        System.arraycopy(var3, var22, var43, 0, var34);
                        ((Shape)var21).N().f().a(var33, 4, var43);
                        var22 += var34;
                     }
                  } else {
                     ((Shape)var21).N().f().a(var33, 0, var34);
                  }

                  var6 += 6;
               }
            }

            var6 = var22;
            break;
         default:
            var10 = com.aspose.cells.b.a.zc.a(var3, var6 + 4);
            var43 = new byte[var10 + 8];
            System.arraycopy(var3, var6, var43, 0, var43.length);
            com.aspose.cells.b.a.a.ze.a(((Shape)var2).N().b(), (Object)var43);
            var6 += 8 + var10;
         }

         if (var14) {
            var11 -= var10 + 8;
            if (var11 == 0 || var6 == var3.length) {
               if (!var15 && ((Shape)var2).getMsoDrawingType() == 0 && ((Shape)var2).N().c().a(16644)) {
                  Picture var35 = new Picture(this.i);
                  byte var36 = 0;
                  int[] var37 = new int[]{var36};
                  Shape var32 = this.a(var37, var35, var3, 0, this.e);
                  var17 = var37[0];
                  var1[0] = var17;
                  return var32;
               } else {
                  var1[0] = var11;
                  return (Shape)var2;
               }
            }
         } else if (var6 == var3.length) {
            var1[0] = 0;
            return (Shape)var2;
         }

         var14 = true;
      }
   }

   private Shape c(Shape var1) throws Exception {
      this.d = this.c.b(this.b);
      if ((this.d & '\uffff') != 236 && (this.d & '\uffff') != 60) {
         this.c.a(-2);
         return var1;
      } else {
         this.c();
         byte[] var2 = this.e;
         int var3 = 0;
         boolean var4 = false;
         boolean var5 = false;
         boolean var7 = false;

         while(var3 + 2 < var2.length) {
            int var6 = com.aspose.cells.b.a.zc.e(var2, var3 + 2);
            int var10;
            byte[] var15;
            switch(var6) {
            case 61443:
            case 61444:
               this.b(var1);
               this.d = this.c.b(this.b);
               if ((this.d & '\uffff') != 93) {
                  this.c.a(-2);
                  return var1;
               }

               this.c();
               this.i.a((Shape)var1, (com.aspose.cells.b.a.d.zm)null);
               this.b(var1);
               return this.a(var2, var3, this.a(this.e[4]));
            case 61445:
               var10 = com.aspose.cells.b.a.zc.a(this.e, var3 + 4) + 8;
               if (var10 != 0) {
                  var15 = new byte[var10];
                  this.a(0, var3, var15, 0, var10);
                  this.a(var15);
                  int var10000 = var3 + var10;
               }

               return var1;
            case 61453:
               switch(var1.getMsoDrawingType()) {
               case 3:
                  this.a(var1, ((Oval)var1).aa(), false);
                  return var1;
               case 30:
                  this.a(var1, ((CellsDrawing)var1).aa(), false);
                  return var1;
               default:
                  continue;
               }
            case 61730:
               int var8 = com.aspose.cells.b.a.zc.b(var2, var3) >> 4;
               com.aspose.cells.b.a.zc.a(var2, var3 + 4);
               var3 += 8;
               int var9 = var3 + var8 * 6;
               var10 = 0;

               for(; var10 < var8; ++var10) {
                  int var13 = com.aspose.cells.b.a.zc.e(var2, var3);
                  int var14 = com.aspose.cells.b.a.zc.a(var2, var3 + 2);
                  if ((var13 & '\uffff') == 904) {
                     var3 += 6;
                  } else {
                     if ((var13 & '\uffff' & '耀') != 0) {
                        if (var14 == 0) {
                           var3 += 6;
                           continue;
                        }

                        if (zash.b(var13, var14)) {
                           int var11 = (com.aspose.cells.b.a.zc.e(var2, var9) & '\uffff') * (com.aspose.cells.b.a.zc.e(var2, var9 + 4) & '\uffff');
                           if (var11 + 6 != var14) {
                              var14 += 6;
                           }

                           byte[] var12 = new byte[var14];
                           System.arraycopy(var2, var9, var12, 0, var14);
                           var1.N().f().a(var13, 5, var12);
                           var9 += var14;
                        } else {
                           var15 = new byte[var14];
                           System.arraycopy(var2, var9, var15, 0, var14);
                           var1.N().f().a(var13, 4, var15);
                           var9 += var14;
                        }
                     } else {
                        var1.N().f().a(var13, 0, var14);
                     }

                     var3 += 6;
                  }
               }

               var3 = var9;
               break;
            default:
               return var1;
            }
         }

         return var1;
      }
   }

   private void a(Shape var1, zbtz var2, boolean var3) throws Exception {
      if (var3) {
         this.d = this.c.b(this.b);
         if ((this.d & '\uffff') != 236 && (this.d & '\uffff') != 60) {
            this.c.a(-2);
            return;
         }

         this.f = this.c.b(this.b);
         this.c.a(this.f & '\uffff');
      }

      this.d = this.c.b(this.b);
      if ((this.d & '\uffff') != 438) {
         this.c.a(-2);
      } else {
         this.c();
         switch((this.e[0] & 255 & 15) >> 1) {
         case 1:
            var2.e(7);
            break;
         case 2:
            var2.e(1);
            break;
         case 3:
            var2.e(8);
            break;
         case 4:
            var2.e(6);
         case 5:
         case 6:
         default:
            break;
         case 7:
            var2.e(3);
         }

         switch((this.e[0] & 255 & 240) >> 4) {
         case 1:
            var2.f(9);
            break;
         case 2:
            var2.f(1);
            break;
         case 3:
            var2.f(0);
            break;
         case 4:
            var2.f(6);
         case 5:
         case 6:
         default:
            break;
         case 7:
            var2.f(3);
         }

         var2.a((this.e[1] & 255 & 2) != 0);
         switch(this.e[2]) {
         case 0:
            var2.d(2);
            break;
         case 1:
            var2.d(3);
            break;
         case 2:
            var2.d(1);
            break;
         case 3:
            var2.d(0);
         }

         int var4 = com.aspose.cells.b.a.zc.e(this.e, 10) & '\uffff';
         int var5 = com.aspose.cells.b.a.zc.e(this.e, 12) & '\uffff';
         int var6 = com.aspose.cells.b.a.zc.e(this.e, 16) & '\uffff';
         if (var6 != 0) {
            var6 = com.aspose.cells.b.a.zc.e(this.e, 18) & '\uffff';
            byte[] var7 = new byte[var6];
            System.arraycopy(this.e, 24, var7, 0, var6);
            var1.c(var7);
         }

         boolean var14 = var4 != 0;
         if (var14) {
            String var8 = "";

            while(var4 != 0) {
               this.d = this.c.b(this.b);
               if ((this.d & '\uffff') != 60) {
                  throw new IOException("File is corrupted");
               }

               this.c();
               if (this.e[0] == 0) {
                  var8 = var8 + zco.a(this.e, 1, (this.f & '\uffff') - 1);
                  var4 -= (this.f & '\uffff') - 1;
               } else {
                  var8 = var8 + Encoding.getUnicode().a(this.e, 1, (this.f & '\uffff') - 1);
                  var4 -= ((this.f & '\uffff') - 1) / 2;
               }
            }

            var2.a(var8);
            this.d = this.c.b(this.b);
            if ((this.d & '\uffff') != 60) {
               throw new IOException("File is corrupted");
            }

            this.c();
            boolean var9 = false;
            int var15;
            if (var5 / 8 <= 2) {
               var15 = com.aspose.cells.b.a.zc.e(this.e, 2) & '\uffff';
               if (var15 > 4) {
                  --var15;
               }

               if (var15 < this.g.z().size()) {
                  var2.k().c((Font)this.g.z().get(var15));
               }
            } else {
               boolean var10 = false;
               boolean var11 = false;

               for(int var12 = 0; var12 < (this.f & '\uffff') - 8; var12 += 8) {
                  int var17 = com.aspose.cells.b.a.zc.e(this.e, var12) & '\uffff';
                  int var16 = com.aspose.cells.b.a.zc.e(this.e, var12 + 8) & '\uffff';
                  FontSetting var13 = var2.a(var17, var16 - var17);
                  var15 = com.aspose.cells.b.a.zc.e(this.e, var12 + 2) & '\uffff';
                  if (var15 > 4) {
                     --var15;
                  }

                  if (var15 < this.g.z().size()) {
                     var13.getFont().c((Font)this.g.z().get(var15));
                  }
               }
            }
         } else {
            this.d = this.c.b(this.b);
            if ((this.d & '\uffff') != 60) {
               this.c.a(-2);
               return;
            }

            this.f = this.c.b(this.b);
            if ((this.f & '\uffff') != 1) {
               this.c.a(-4);
               return;
            }

            this.c.a(1);
            this.d = this.c.b(this.b);
            if ((this.d & '\uffff') == 60) {
               this.f = this.c.b(this.b);
               this.c.a(this.f & '\uffff');
            } else {
               this.c.a(-2);
            }
         }

      }
   }

   private int a(int var1, int var2, byte[] var3, int var4, int var5) throws Exception {
      if (var2 + var5 <= (this.f & '\uffff')) {
         System.arraycopy(this.e, var2, var3, var4, var5);
         var2 += var5;
         return var2;
      } else {
         int var7;
         for(boolean var6 = false; var5 - var4 > (this.f & '\uffff'); var2 = var1) {
            var7 = (this.f & '\uffff') - var2;
            System.arraycopy(this.e, var2, var3, var4, var7);
            var4 += var7;
            this.d();
         }

         var7 = var5 - var4;
         System.arraycopy(this.e, var2, var3, var4, var7);
         var2 += var7;
         return var2;
      }
   }

   private void d() throws Exception {
      this.d = this.c.b(this.b);
      switch(this.d) {
      case 60:
      case 235:
      case 236:
         this.c();
         if ((this.f & '\uffff') == 0) {
            this.d();
         }

         return;
      default:
         throw new CellsException(18, "File is corrupted");
      }
   }

   private void a(ShapeCollection var1) {
      this.i = var1;
      if (this.j instanceof Chart) {
         Chart var2 = (Chart)this.j;
         var2.a(var1);
      } else {
         Worksheet var3 = (Worksheet)this.j;
         var3.a(var1);
      }

   }

   void c() throws Exception {
      this.a.a(this.c);
      this.e = this.a.a();
      this.f = this.a.b();
   }
}
